﻿
using UnityEngine;

public static  class VectorSet
{
    public static Vector2 Vector3ToVector2(this Vector3 vector3)
    {
        return new Vector2(vector3.x, vector3.y);
    }
    public static Vector3 Vector3Up(this Vector3 vector3)
    {
        return new Vector3(vector3.x, vector3.y,0).normalized;
    }

    public static Transform OnFindTransform(this GameObject obj,string name)
    {
        return GameObject.Find(name).GetComponent<Transform>();
    }

    //写一个2d的lookat
    /*
    public static Vector3 LookAt2d()
    {
    }
     */
}

